export const PARAMS_PARK = [
     {
        type: "a-input",
        field: "name",
        title: "园区名称",
        value: "",
        props: {placeholder:"请输入园区名称"}
    },
    {
        type: "a-input",
        field: "contact",
        title: "联系人姓名",
        value: "",
        props: {placeholder:"请输入联系人姓名"}
    },
    {
        type: "a-input",
        field: "contactPhone",
        title: "联系电话",
        value: "",
        props: { placeholder: "请输入联系电话", maxLength: 11 },
        validate: [
            {
            validator: (rule, val, d) => {
                val && !/^1(3[0-9]|4[0-9]|5[0-9]|6[0-9]|7[0-9]|8[0-9]|9[0-9])\d{8}$/.test(val) ? d(true) : d();
            },
            message: "手机格式错误"
            }
        ]
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
]

export const COLUMNS_SYS_PARK = [
    {
        title: '园区名称',
        dataIndex: 'name'
    },
    {
        title: '联系人',
        dataIndex: 'contact'
    },
    {
        title: '联系人电话',
        dataIndex: 'contactPhone',
    },
    {
        title: '所在地区',
        dataIndex: 'area',
    },
    {
        title: '关联企业数量',
        dataIndex: 'associatedEnterpriseNum',
    },
    {
        title: '状态',
        dataIndex: 'status',
        scopedSlots: { customRender: 'status' }
    },
     {
        title: '创建时间',
        dataIndex: 'createdTime',
    },
    {
        title: '操作',
        dataIndex: 'action',
        scopedSlots: { customRender: 'action' }
    }
]
export const COLUMNS_SYS_ENTERPRISE_CONACT = [
     {
        title: '关联企业名称',
        dataIndex: 'name'
    },
    {
        title: '服务费比例',
        dataIndex: 'fees',
        width:150,
        scopedSlots: { customRender: 'fees' }
    },
    {
        title: '服务费计算方式',
        dataIndex: 'serviceFeeCalculateMode',
        customRender: (text, row, index) => {
            if (row.serviceFeeCalculateMode === 1) {
                return '正算'
            } else if (row.serviceFeeCalculateMode === 2){
                return '倒扣'
            }
            return ''
        }
    },
    {
        title: '合同签约时间',
        dataIndex: 'signTime',
    },
    {
        title: '合同失效时间',
        dataIndex: 'invalidTime',
    },
    {
        title: '合同',
        dataIndex: 'agreement',
        scopedSlots: { customRender: 'agreement' }
    }
]

export const PARAMS_ENTERPRISE = [
     {
        type: "a-input",
        field: "enterpriseName",
        title: "企业名称",
        value: "",
        props: {placeholder:"请输入企业名称"}
    },
    {
        type: "a-input",
        field: "contact",
        title: "联系人姓名",
        value: "",
        props: {placeholder:"请输入联系人姓名"}
    },
    {
        type: "a-input",
        field: "contactPhone",
        title: "联系电话",
        value: "",
        props: { placeholder: "请输入联系电话", maxLength: 11 },
        validate: [
            {
            validator: (rule, val, d) => {
                val && !/^1(3[0-9]|4[0-9]|5[0-9]|6[0-9]|7[0-9]|8[0-9]|9[0-9])\d{8}$/.test(val) ? d(true) : d();
            },
            message: "手机格式错误"
            }
        ]
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
    
]
export const COLUMNS_SYS_ENTERPRISE = [
     {
        title: '企业名称',
        dataIndex: 'name'
    },
    {
        title: '联系人',
        dataIndex: 'contact'
    },
    {
        title: '联系人电话',
        dataIndex: 'contactPhone',
    },
    {
        title: '手续费比例',
        dataIndex: 'platformRatio',
    },
    {
        title: '税点',
        dataIndex: 'vatRatio',
    },
     {
        title: '单人单月最大限额（支付宝）',
         dataIndex: 'aliPayAmountBiggestLimit',
         width:240
    },
      {
        title: '单人单月最大限额（招行）',
          dataIndex: 'cmbAmountBiggestLimit',
         width:240
    },
    {
        title: '个人签约方式',
        dataIndex: 'personalSignModes',
    },
     {
        title: '签约顺序',
         dataIndex: 'signOrdering',
        customRender: (text, row, index) => {
            if (row.signOrdering === 1) {
                return '前置签约'
            } else if (row.signOrdering === 2){
                return '后置签约'
            } else if (row.signOrdering === 3){
                return '无需签约'
            }
            return ''
        }
    },
    {
        title: '关联园区数量',
        dataIndex: 'associatedParkNum',
    },
    {
        title: '状态',
        dataIndex: 'status',
        scopedSlots: { customRender: 'status' }
    },
     {
        title: '创建时间',
        dataIndex: 'createdTime',
    },
    {
        title: '操作',
        dataIndex: 'action',
        scopedSlots: { customRender: 'action' },
        fixed:'right'
    }
]

export const COLUMNS_SYS_PARK_CONACT = [
     {
        title: '关联园区名称',
        dataIndex: 'name'
    },
    {
        title: '服务费比例',
        dataIndex: 'fees',
        width:150,
        scopedSlots: { customRender: 'fees' }
    },
    {
        title: '服务费计算方式',
        dataIndex: 'serviceFeeCalculateMode',
        customRender: (text, row, index) => {
            if (row.serviceFeeCalculateMode === 1) {
                return '正算'
            } else if (row.serviceFeeCalculateMode === 2){
                return '倒扣'
            }
            return ''
        }
    },
    {
        title: '合同签约时间',
        dataIndex: 'signTime',
    },
    {
        title: '合同失效时间',
        dataIndex: 'invalidTime',
    },
    {
        title: '合同',
        dataIndex: 'agreement',
        scopedSlots: { customRender: 'agreement' }
    }
]

export const COLUMNS_ENTERPRISE_PARK = [
     {
        title: '园区服务商名称',
        dataIndex: 'name'
    },
    {
        title: '园区负责人(商务)姓名',
        dataIndex: 'contact'
    },
    {
        title: '园区负责人(商务)电话',
        dataIndex: 'contactPhone',
    },
    {
        title: '服务费率',
        dataIndex: 'fees',
        scopedSlots: { customRender: 'fees' }
    },
    {
        title: '服务费计算方式',
        dataIndex: 'serviceFeeCalculateMode',
        customRender: (text, row, index) => {
            if (row.serviceFeeCalculateMode === 1) {
                return '正算'
            } else if (row.serviceFeeCalculateMode === 2){
                return '倒扣'
            }
            return '--'
        },
    },
     {
        title: '签约日期',
        dataIndex: 'signTime',
    },
      {
        title: '失效日期',
        dataIndex: 'invalidTime',
    },
       {
        title: '合同协议',
           dataIndex: 'agreement',
        scopedSlots: { customRender: 'agreement' }
    },
     {
        title: '状态',
         dataIndex: 'status',
         customRender: (text, row, index) => {
            if (row.status === 1) {
                return '启用'
            } else if (row.status === 2){
                return '禁用'
            }
            return '--'
        },
    },
    {
        title: '操作',
        dataIndex: 'action',
        scopedSlots: { customRender: 'action' },
        fixed:'right'
    }
]
export const COLUMNS_PARK_ENTERPRISE = [
     {
        title: '企业名称',
        dataIndex: 'name'
    },
    {
        title: '联系人姓名',
        dataIndex: 'contact'
    },
    {
        title: '联系人电话',
        dataIndex: 'contactPhone',
    },
    {
        title: '服务费率',
        dataIndex: 'fees',
        scopedSlots: { customRender: 'fees' }
    },
    {
        title: '服务费计算方式',
        dataIndex: 'serviceFeeCalculateMode',
        customRender: (text, row, index) => {
            if (row.serviceFeeCalculateMode === 1) {
                return '正算'
            } else if (row.serviceFeeCalculateMode === 2){
                return '倒扣'
            }
            return '--'
        },
    },
    {
        title: '单人单月最大限额',
        dataIndex: 'aliPayAmountBiggestLimit',
        scopedSlots: { customRender: 'aliPayAmountBiggestLimit' }
    },
     {
        title: '签约日期',
        dataIndex: 'signTime',
    },
      {
        title: '失效日期',
        dataIndex: 'invalidTime',
    },
       {
        title: '合同协议',
           dataIndex: 'agreement',
        scopedSlots: { customRender: 'agreement' }
    },
     {
        title: '状态',
       dataIndex: 'status',
         customRender: (text, row, index) => {
            if (row.status === 1) {
                return '启用'
            } else if (row.status === 2){
                return '禁用'
            }
            return '--'
        },
    },
    {
        title: '操作',
        dataIndex: 'action',
        scopedSlots: { customRender: 'action' },
        fixed:'right'
    }
]

 export const OPTION_INLINE = {
    form: {layout: 'inline'},
    resetBtn: false,
    submitBtn: false
  }
  export const OPTION_BLOCK= {
    form: { layout: "vertical" },
    row:{gutter: 20},
    resetBtn: false,
    submitBtn: false
  }